import java.util.LinkedList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-09-14
 * Time: 15:22
 */
public class Main3 {
    public static void main(String[] args) {
        LinkedList<Integer> list = new LinkedList<>();

        list.add(1);
        System.out.println(list);
        try {
            System.out.println();
            throw  new IndexNotLegal("Index不合法");
        } catch (IndexNotLegal e) {
            e.printStackTrace();
        }

    }
}
